@page
@{ Layout = "_LayoutApp"; }
@section Styles{
    <style>
        body {
            margin: 0;
            padding: 0;
        }
    </style>
}
<div class="p-3" v-if="total>0">
    <div v-for="(paper,index) in list" v-on:click="btnViewClick(paper.id)">
        <div class="card shadow-none rounded-0 border-0 mb-3">
                    <div class="card-body">
                        <div class="row align-items-center g-3">
                            <div class="col">
                                <p class="my-2 fw-bold">
                                    {{ paper.title }}
                                </p>
                                <ul class="list-inline m-0 fw-light">
                                    <li class="list-inline-item">
                                        <i class="el-icon-date me-2"></i><span>{{ paper.examStartDateTimeStr }}-{{ paper.examEndDateTimeStr }}</span>
                                    </li>
                                      <li class="list-inline-item">
                                        <span class="me-2">总分：{{paper.totalScore}}</span><span>及格分：{{paper.passScore}}</span>
                                    </li>
                                       <li class="list-inline-item">
                                           剩余次数：
                            <span class="text-success fw-bold" v-if="(paper.userExamTimes-paper.myExamTimes)>0">
                                {{paper.userExamTimes-paper.myExamTimes}}
                            </span>
                            <span class="fs-3 text-danger fw-bold" v-else>
                                0
                            </span>
                            /{{paper.userExamTimes}}
                                       </li>
                                </ul>
                                  <div class="mt-2 text-center">
                                    <el-tag size="small" :type="paper.paperStatus" effect="dark" class="rounded-pill"><i class="el-icon-info me-2"></i>{{ paper.paperStatusStr }}</el-tag>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

    </div>
    <div class="my-5 text-center">
        <el-button class="rounded-pill border-0" icon="el-icon-refresh-right" v-if="list.length>0 && list.length<total" v-on:click="btnLoadMoreClick" :loading="loadMoreLoading">加载更多</el-button>
        <small v-else>没有更多了</small>
    </div>
    <div class="py-8"></div>
</div>
<div class="pt-8" v-else>
    <el-empty :image-size="88"></el-empty>
</div>

@section Scripts{
    <script src="/sitefiles/assets/js/app/exam/examPaper.js" type="text/javascript"></script>
}